<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core">

<!--
    
    Copyright 2007-2012 Audrius Valunas

    This file is part of LibreACS.

    LibreACS is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    LibreACS is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with LibreACS.  If not, see <http://www.gnu.org/licenses/>.

    -->

<ui:composition template="mt.xhtml">
	<ui:define name="title">CPE's for customer id #{Cpe.customerid_in}</ui:define>
	<ui:define name="body">
		<h3>#{Cpe.findResultLength} CPE found for serial: #{Cpe.snIn}</h3>
		<a4j:form id="cpelist">
			<rich:dataTable onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
				onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
				cellpadding="0" cellspacing="0" width="700" border="0" var="c"
				value="#{Cpe.findResult}" id="cpeList">

				<rich:column>
					<f:facet name="header">
						<h:outputText value="OUI" />
					</f:facet>
					<h:outputText value="#{c.model.oui}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="Manufacturer" />
					</f:facet>
					<h:outputText value="#{c.model.manufacturer}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="Model" />
					</f:facet>
					<h:outputText value="#{c.model.hclass}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="Currentsoftware" />
					</f:facet>
					<h:outputText value="#{c.currentsoftware}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="Hardware" />
					</f:facet>
					<h:outputText value="#{c.hardware}" />
				</rich:column>

				<rich:column>
					<f:facet name="header">
						<h:outputText value="Serial number" />
					</f:facet>
					<h:commandLink style="display:block;height:20px"
						value="#{c.serialno}" action="#{Cpe.getItem}"
						reRender="cpelist,cpedetails">
						<a4j:actionparam name="id" value="#{c.id}" assignTo="#{Cpe.id}" />
					</h:commandLink>
				</rich:column>
			</rich:dataTable>
			<!-- 
			<rich:datascroller for="cpeList" renderIfSinglePage="false"
				fastControls="hide" id="dSc" />
				 -->
		</a4j:form>
	</ui:define>
</ui:composition>
</html>